using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Trans.Refunds;

namespace JlPay.Sdk.Services.Trans.Refunds
{
    /// <summary>
    /// 退款服务
    /// </summary>
    public class RefundsService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public RefundsService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 退款申请接口
        /// </summary>
        /// <param name="request">退款申请请求</param>
        /// <returns>退款申请响应</returns>
        public async Task<RefundsResponse> RefundsAsync(RefundsRequest request)
        {
            return await PostAsync<RefundsRequest, RefundsResponse>(request, RefundsRequest.API_URL);
        }
    }
} 